﻿using Jay.Sc2.Bof.Lib.State;

namespace Jay.Sc2.Bof.Lib.Action.Zerg
{
	public class ActionProduceHatchery : ActionProduceFromDrone
	{
		public static ActionProduceHatchery Instance = new ActionProduceHatchery();
		private ActionProduceHatchery() : base(100, 300, 0) { }
		public override ZergState.ZergBuilding GetBuilding(ZergState state) { return state.Hatchery; }
		public override string EventName { get { return "ActionSpawnHatchery"; } }
		public override bool HaveTechnology(IBuildOrder bo) { return true; }
		public override void OnProductionStart(IBuildOrder bo)
		{
			ZergState state = bo.State as ZergState;
			base.OnProductionStart(bo);
			state.TotalBases.Building++;
		}
		public override void OnProductionFinished(IBuildOrder bo)
		{
			ZergState state = bo.State as ZergState;
			base.OnProductionFinished(bo);
			state.TotalBases.Built();
			state.ProduceLarva(bo);
		}
	}
}
